"""
日期类使用
"""
from datetime import date, timedelta

# 指定年月日创建日期
d1 = date(2019, 8, 21)
print(d1)

# 返回当前时间
today = date.today()
print(today)
print(date.fromordinal(23))
print(date.isoformat(today))

# 日期天数相加
t = timedelta(days=10)
today_10 = today + t
print(today_10)
